import json

import requests

headers = {
    'Accept': '*/*',
    'Accept-Encoding': 'gzip, deflate, sdch, br',
    'Accept-Language': 'zh-CN,zh;q=0.8',
    'Cache-Control': 'no-cache',
    'Connection': 'keep-alive',
    'Content-Type': 'application/x-www-form-urlencoded',
    'Cookie': 'SINAGLOBAL=2270430582795.7773.1531024498527; UOR=www.iqiyi.com,widget.weibo.com,www.tiantianzhibo.com; login_sid_t=30503d46f6f42de5acfbb9436dd814e9; YF-Ugrow-G0=56862bac2f6bf97368b95873bc687eef; YF-V5-G0=694581d81c495bd4b6d62b3ba4f9f1c8; cross_origin_proto=SSL; _s_tentry=-; wb_view_log=1920*10801.25; Apache=7843751104822.154.1535805910374; ULV=1535805910380:3:1:1:7843751104822.154.1535805910374:1534422189786; SUB=_2A252jvpKDeRhGeRK7FIT-SbNyTmIHXVV-myCrDV8PUNbmtBeLVPTkW9NUy-gxg-JjGMhJPyWf9RH4YNW3S7ZZy1Z; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9W51sWc-bPTSfHpRk33y8SSB5JpX5KzhUgL.FozXS05E1Knpeo-2dJLoIEBLxK-L1h-LBoeLxKqL1-eLB.2LxK.L1KMLBo.LxK.L1KzL1-qt; SUHB=0WGdIpPQvIKb_c; ALF=1567341978; SSOLoginState=1535805978; YF-Page-G0=46f5b98560a83dd9bfdd28c040a3673e; wb_view_log_2470298125=1920*10801.25',
    'Host': 'weibo.com',
    'Pragma': 'no-cache',
    'Referer': 'https://weibo.com/1799408092/GxlPazpWe?filter=hot&root_comment_id=0&type=comment',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 SE 2.X MetaSr 1.0',
    'X-Requested-With': 'XMLHttpRequest'
}
url = 'https://weibo.com/aj/v6/comment/big?ajwvr=6&id=4279487208441190&root_comment_max_id=148862836571294&root_comment_max_id_type=0&root_comment_ext_param=&page=8&filter=hot&sum_comment_number=9068&filter_tips_before=0&from=singleWeiBo&__rnd=1535806653583'
res = requests.get(url, headers=headers)
data = json.loads(res.content.decode())
print(data)
